/**
 * @function 日志模块api
 * @author anytao
 * @created 2016-08-24
 * @version 1.0
 */
'use strict';
import Base from './base.js';

export default class extends Base {

    /**
     * 新增日志
     */
    async addAction() {

        let log = JSON.parse(this.post('log'));

        let result = {
            success: true,
            message: ''
        };

        let logId = 0;

        logId = await this.model('log').add(log);

        if (logId) {
            return result;
        } else {
            result.success - false;
            result.message = '日志写入失败,返回信息:' + logId;
        }
    }

    /**
     * 获取日志数据
     */
    async listAction() {


    }

}